<include file="Public:header"/>
<include file="Public:left"/>
<style>
	td {
		text-align: center;
	}
</style>
<style type="text/css" src="__STATIC__/admin/css/style.css" ></style>
<section>
	<div class="page_title">
		<h2 class="fl">优惠券列表</h2>
		<h2 class="fl" style="margin-left: 20px;"><a href="{:url('coupon/add')}">添加优惠券</a></h2>
		<h2 class="fl" style="margin-left: 20px;"><a href="{:url('coupon/background')}">领券中心背景</a></h2>
		<h2 class="fl" style="margin-left: 20px;"><a href="{:url('coupon/tip')}">消息提醒logo图</a></h2>
		<form action="">
			<select name="status"  style="margin-left: 20px;">
				<option value="">全部类型</option>
				<option value="1" <eq name="status" value="1">selected </eq>>订餐用</option>
				<option value="2" <eq name="status" value="2">selected </eq>>游泳用</option>
				<option value="3" <eq name="status" value="3">selected </eq>>健身用</option>
			</select>
			<input  style="width: 50px;height: 23px;line-height: 16px;cursor: pointer;" type="submit" value="搜索">
		</form>
		
	</div>
	<table class="table">
		<tr>
			<th>优惠券编号</th>
			<th>优惠券名称</th>
			<th>优惠券描述</th>
			<th>领取条件</th>
			<th>有效时间</th>
			<th>优惠券类型</th>
			<th>操作</th>
		</tr>

		<volist name="list" id="vo" key="k">
			<tr>
				<td>{$vo.id}</td>
				<td>{$vo.name}</td>
				<td>{$vo.des}</td>
				<td>
					<if condition="$vo['type'] eq '1'">
						任何会员可领
					<elseif condition="$vo['type'] eq '2'">
						金卡及以上
					<elseif condition="$vo['type'] eq '3'">
						铂金及以上
					<elseif condition="$vo['type'] eq '4'">
						黑金卡可领
					</if>
				</td>
				<td>{$vo.starttime|date="Y-m-d",###}-{$vo.endtime|date="Y-m-d",###}</td>
				<td>
					<if condition="$vo['status'] eq '1'">
						订房专用
					<elseif condition="$vo['status'] eq '2'">
						游泳专用
					<elseif condition="$vo['status'] eq '3'">
						健身专用
					</if>
				</td>
				<td>
					<a onclick="return confirm('确定删除？')" href="{:url('coupon/del',array('id'=>$vo['id'],'del'=>0))}" class="inner_btn">删除</a>
				</td>
			</tr>
		</volist>
	</table>

</section>
	{$list->render()}
<script>
	$(document).ready(function() {
		//tab
		$(".admin_tab li a").click(function() {
			var liindex = $(".admin_tab li a").index(this);
			$(this).addClass("active").parent().siblings().find("a").removeClass("active");
			$(".admin_tab_cont").eq(liindex).fadeIn(150).siblings(".admin_tab_cont").hide();
		});
	});
</script>

</div>
</section>
</body>

</html>